<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang='en-uk'>
    <head>
        <meta http-equiv='Content-Type' content='text/html; charset=utf-8'>

        <link rel='Stylesheet' type='text/css' href='{{ MEDIA_URL }}stylesheets/layout.css'>
        <link rel='Stylesheet' type='text/css' href='{{ MEDIA_URL }}stylesheets/menu.css'>
        <link rel='Stylesheet' type='text/css' href='{{ MEDIA_URL }}stylesheets/style.css'>
        <!--[if lte IE 8]>
        <link rel='Stylesheet' type='text/css' href='{{ MEDIA_URL }}stylesheets/style-ie.css'>
        <![endif]-->
        <link rel='Stylesheet' type='text/css' href='{{ MEDIA_URL }}stylesheets/time_bar.css'>
        <link rel='Stylesheet' type='text/css' href='{{ MEDIA_URL }}stylesheets/tablesorter.css'>
        <link rel='Stylesheet' type='text/css' href='{{ MEDIA_URL }}stylesheets/ui-lightness/jquery-ui-1.8.4.custom.css'>

        <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery-1.4.2.min.js"></script>
        <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery.tablesorter.min.js"></script>
        <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery-ui-1.8.4.custom.min.js"></script>
        <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery-datepicker-call.js"></script>

        <script language="javascript" type="text/javascript">
          $(document).ready(function() {
              showKal('init');
//              $('.tip').addClass('collapsedTip');
//              $('.tip').mouseenter(function() {  $(this).toggleClass('collapsedTip', 1000);  });
//              $('.tip').mouseleave(function() {  $(this).toggleClass('collapsedTip', 1000);  });
          });
        </script>

        <title>{% block title %}{% endblock %}</title>
    </head>
    <body>
        <div id="pageWrapper">
          <div class="logged_user_info">
            {% if user.is_anonymous %}
                Not logged in. <a href="/entelib/login/">Login</a> or <a href="/entelib/register/newuser">register</a>.
            {% else %}
                Welcome <span class="who">{{ user.first_name }} {{ user.last_name }}</span> {% if user.is_superuser %}(superuser){% endif%}
                <a href='/entelib/logout/'>(Logout)</a>
            {% endif %}
          </div>
          <div id='header'>
            <h1><span>{% block header %}{% endblock %}</span></h1>
          </div>

          {% if messages %}
            <div class="messagesWrapper">
              <ul id="messages">
                {% for message in messages %}
                  <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
                {% endfor %}
              </ul>
            </div>
          {% endif %}

          {% block menu %}{% endblock %}

          <div id="rest">
            {% block rest %}{% endblock %}
          </div>

          <div id="footer">Contact person: <a href="mailto:Marcin.Milewski@nsn.com?subject=LibraryApp">Marcin.Milewski@nsn.com</a></div>
        </div> <!-- /pageWrapper -->

        {% if is_dev %}
          <div class="tmp_log_as">
            <a href="/_login_user/">Login as user</a>
            <a href="/_login_lib/">Login as librarian</a>
            <a href="/_login_admin/">Login as admin</a>
          </div>
        {% endif %}

    </body>
</html>
